@import 'reset';

@mainColor: #80bd01;
@radius: 5px;

body {
  background: #e1e1e1;
  color: #333;
}
a {
  color: #719f11;
}
a:visited {
  color: #719f11;
}

.main {
  overflow: hidden;
  margin: 0 5px 10px;
  padding-top: 41px;
}

.Router {
  position: relative;
  width: calc(100% - 10px);
  min-height: calc(100vh - 61px);
  transition: all 0.8s ease;
  // top: 42px;
}

.head {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  width: 100vw;
  height: 36px;
  background: #444;
  z-index: 10;
  .logo {
    padding: 5px 0;
    margin: 0 auto;
    width: 100px;
    height: 36px;
  }
  .more {
    margin-right: 10px;
  }
  .back {
    margin-left: 10px;
    width: 20px;
  }
}

//首页悬浮tab切换
.list-type {
  position: fixed;
  //top: 41px;
  left: 0;
  width: 100%;
  padding: 5px;
  margin-top: -5px;
  background: #e1e1e1;
  z-index: 5;
  ul {
    display: flex;
    justify-content: center;
    line-height: 2;
    text-align: center;
    background: #f6f6f6;
    border-radius: @radius;
  }
  li {
    flex: 1;
    color: @mainColor;
  }
  li::before,
  li::after {
    display: inline-block;
    opacity: 0;
    transition: transform 0.3s, opacity 0.2s;
  }
  li::before {
    margin-right: 5px;
    content: '[';
    transform: translateX(20px);
  }
  li::after {
    margin-left: 5px;
    content: ']';
    transform: translateX(-20px);
  }
  li.active::before,
  li.active::after {
    opacity: 1;
    -webkit-transform: translateX(0px);
    -moz-transform: translateX(0px);
    transform: translateX(0px);
  }
}
//首页列表
.list {
  overflow: hidden;
  margin-top: 41px;
  border-radius: @radius;
  li {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 10px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    &:hover {
      background: #f5f5f5;
    }
    img {
      float: left;
      width: 48px;
      height: 48px;
      margin-right: 10px;
      background: #f0f0f0;
    }
  }
  .type {
    display: inline-block;
    padding: 1px 4px;
    margin-right: 5px;
    border-radius: 3px;
    background-color: #e5e5e5;
    color: #999;
    font-size: 12px;
  }
  .typegood {
    background-color: @mainColor;
    color: #fff;
  }
  .typetop {
    background-color: #ff3838;
    color: #fff;
  }
  .title {
    margin: 0 58px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    a {
      color: #333;
      &:visited {
        color: #888;
      }
    }
  }
  .count {
    position: absolute;
    top: 20%;
    right: 3%;
    font-size: 10px;
    color: #b4b4b4;
    span {
      color: @mainColor;
    }
  }
  .date {
    position: absolute;
    bottom: 20%;
    right: 3%;
    font-size: 10px;
    color: #777;
  }
}
//首页分页
.load-more {
  margin: 20px 0;
  text-align: center;
  .prev,
  .next {
    display: inline-block;
    padding: 5px 18px;
    margin: 0 10px;
    background: #fff;
    border-radius: @radius;
    color: @mainColor;
  }
}
//回到顶部
.backtotop {
  position: fixed;
  right: 0;
  bottom: 20%;
  width: 50px;
  height: 50px;
  background: #f6f6f6;
  text-align: center;
  border: 1px solid #ccc;
  border-right: 0;
  border-radius: 50% 0 0 50%;
  transition: 1s linear;
  z-index: 11;
  svg {
    width: 40px;
    height: 50px;
  }
}

//加载过渡动画
.slide-fade-enter-active {
  transition: all 0.5s ease;
}
.slide-fade-leave-active {
  transition: all 0.5s ease;
}
.slide-fade-enter,
.slide-fade-leave-active {
  transform: translateX(60px);
  opacity: 0;
}

//切页过渡动画
.slide-left-enter,
.slide-right-leave-active {
  opacity: 0;
  -webkit-transform: translate(100%, 0);
  transform: translate(100%, 0);
}

.slide-left-leave-active,
.slide-right-enter {
  opacity: 0;
  -webkit-transform: translate(-100%, 0);
  transform: translate(-100% 0);
}

// 收藏、消息、个人页列表
.user-list {
  overflow: hidden;
  margin: 10px 0;
  background: #fff;
  border-radius: 5px;
}
.user-list-title {
  padding: 10px;
  background-color: #f6f6f6;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
}

//markdown样式
.markdown-body {
  a {
    color: #719f11;
  }
  li {
    list-style: disc;
  }
}

@media screen and (min-width: 900px) {
  .head .more,
  .mask {
    display: none;
  }
  .slide-menu {
    position: relative;
    right: 5px;
    top: 41px;
  }
  .Router {
    width: calc(100% - 220px);
  }
  .list-type {
    width: calc(100% - 210px);
  }
}
